<?php

use think\facade\Route;

Route::group('admin', function () {
    // 上传证书
    Route::get("group", "admin.Group/list");
    Route::post('file/uploadCert', 'admin.File/uploadCert');
    // 文件列表
    Route::get("file", "admin.File/list");
    Route::group(function () {
        Route::any('config/filesystem', 'admin.Config/filesystem');

        // 文件管理
        Route::post('file/upload', 'admin.File/upload');
        Route::post('file/rename/:id', 'admin.File/rename');
        Route::post('file/move/:id', 'admin.File/move');
        Route::delete("file/:id", "admin.File/delete");
    
        // 文件分组管理
        Route::post("group", "admin.Group/add");
        Route::put("group/:id", "admin.Group/edit");
        Route::delete("group/:id", "admin.Group/delete");
    })->middleware('check_rule');
})->middleware('check_login', 'admin');
